<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String basePath = request.getContextPath();
	String path = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+basePath+"/";
	request.setAttribute("path",path);
%>
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
	<meta name="format-detection" content="telephone=no,address=no,email=no"/>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<title>订单确认</title>
	<script type="text/javascript" src="${path}/mobileTerminal/js/jquery.js"></script>
	<script type="text/javascript" src="${path}/js/jquery-2.1.1.min.js"></script>
	<link href="${path}/mobileTerminal/css/style.css" rel="stylesheet" media="all">
	<link rel="shortcut icon" href="${path}/mobileTerminal/img/favicon.png">
</head>
<script>
	function createOrder() {
		document.getElementById("form1").submit();
    }
</script>
<body class="hu_shopping">
<form id="form1" name="form1" method="post" action="${path}/orderPay">
	<input id="userId" name="userId" style="display: none" value="${userId}">
	<input id="productId" name="productId" style="display: none" value="${product.id}">
	<input id="addressId" name="addressId" style="display: none" value="${address.id}">
	<input id="num" name="num" style="display: none" value="${num}">
	<input id="totalMoney" name="totalMoney" style="display: none" value="${totalMoney}">
	<header>
		<div class="headerwrap">
			<div class="header_wrap">
				<a href="javascript:history.go(-1);" class="return_last">返回</a>
				<h1>订单确认</h1>
			</div>
		</div>
	</header><!-- header -->
	<div class="content_wrap" id="orderfir_wrap">
		<div class="order_fir">
			<c:if test="${type == 1}">
			<div class="orderfir_top">
				<div class="orderfir_nameadd fl">
					<p class="orderfir_name fl">收件人:<span>${address.addressee}</span></p>
					<p class="orderfir_phone fl"><span></span>${address.addressPhone}</p>
					<i class="add_icon"></i><p class="orderfir_add fl">收货地址:${address.detailed}</p>
					<div class="clear"></div>
				</div>
				<div class="go_nameadd fl">
					<a href="${path}/addSelect?userId=${userId}&productId=${product.id}&num=${num}"></a>
				</div>
				<div class="clear"></div>
			</div><!-- orderfir_top -->
			</c:if>
			<c:if test="${type == 0}">
				<div class="orderfiradd_add">
					<a href="${path}/newAddress?userId=${userId}&productId=${productId}&num=${num}">新增地址</a>
				</div><!-- orderfir_top -->
			</c:if>
			
			<div class="orderfir_center">
				<p class="orderfir_payment">
					<span class="payment_tl orderfircenter_tl fl">支付方式：</span>
					<span class="payment_txt fl">在线支付</span>
					<span class="clear"></span>
				</p>
				
				<p class="orderfir_deliveryway">
					<span class="deliveryway_tl orderfircenter_tl fl">配送方式：</span>
					<span class="deliveryway_txt fl">顺丰快递</span>
					<span class="clear"></span>
				</p>
				
				<p class="orderfirinvoice">
					<span class="orderfircenter_tl fl">开具发票：</span>
					<span class="invoice_check fl"><input name="invoice" type="checkbox" id="invoice" value="1" /></span>
					<span class="clear"></span>
				</p>
				
				<p class="orderfir_invoice">
					<span class="invoice_tl orderfircenter_tl fl">发票类型：</span>
					<select class="invoice_select fl" name="invoiceType">
					  <option selected="" value="普通发票">普通发票</option>
					  <option value="增值专用发票">增值专用发票</option>
					</select>
					<span class="clear"></span>
				</p>
				
				<p class="orderfir_invoiceto">
					<span class="nvoiceto_tl orderfircenter_tl fl">发票抬头：</span>
					<span class="nvoiceto_txt fl">
						<input onfocus="document.getElementById('nvoiceto_note').style.display='none'" onblur="if(value=='')document.getElementById('nvoiceto_note').style.display='block'" type="text" name="invoiceRise"/>
						<span id="nvoiceto_note" class="nvoiceto_note">发票抬头</span>
					</span>
					<span class="clear"></span>
				</p>
			</div><!-- orderfir_center -->
			
			<div class="orderfir_product">
				<h4>商品详情：</h4>
				<ul class="orderfirul_list">
					<li>
						<div class="orderfirul_img fl"><a><img src="${path}/${product.carousel0}" style="width:80px;height:80px;"></a><div class="dummy"></div></div>
						<div class="orderfirul_txt fl">
							<a class="orderfirul_title">${product.productName}</a>
							<div class="orderfirul_price fl">
								<p class="orderfirul_text">${product.keyWord}</p>
								<p class="red_txt">￥<span class="red_txt">${product.nowPrice}</span></p>
							</div>
							<div class="orderfirul_num fl">×<span>${num}</span></div>
							<div class="clear"></div>
						</div>
						<div class="clear"></div>
					</li>
				</ul>
			</div><!-- orderfir_product -->
		
			
		</div><!-- order_confir -->
	</div><!-- content_wrap -->
	
	<div class="orderfir_bottom">
		<div class="orderfir_total fl">
			总共金额：<span class="red_txt">￥<span class="firtolprice red_txt">${totalMoney}</span></span>
		</div>
		<div class="orderfir_but fl">
			<a onclick="createOrder()"><input id="orderfirbut" type="button" value="提交订单"/></a>
		</div>
		<div class="clear"></div>
	</div><!-- go_collectionbuy -->
</form>

	<div class="footer_copyright">
		<p>苏州知行合一网络科技有限公司提供技术支持/p>
	</div><!-- footer_copyright -->
</body>
</html>